<div>
    <!-- 导航标题栏 -->
    <title-bar name="{{page.comment}}">
    </title-bar>
    <!-- /导航标题栏 -->
    <!-- 页面主体内容 -->
    <div-wrapper type="form">
    	<form conow-form-validate name="{{page.name}}form" no-validate class="conow-form">
		  <conow-block-form>
			    <conow-block class="word-4">
			    	{% for column in  page.columns %}
						 {% if column.type=='text' %}
						    <div class="form-group {% if column.require %} required {% endif %}">
						        <label for="{{column.name}}">{{column.comment}}</label>

						        <div class="input-container">
						            <input type="text" name="{{column.name}}" ng-model='vm.data.{{column.name}}' id="{{column.name}}" placeholder="请填写{{column.comment}}"   {% if column.require %} required {% endif %} {% if column.maxlength %} maxlength={{column.maxlength}} {% endif %}/>
						        </div>
						    </div>
						    {% elif column.type=='date' %}
						      <div class="form-group  {% if column.require %} required {% endif %}">
						        <label for="{{column.name}}">{{column.comment}}</label>

						        <div class="input-container">
						            <conow-date-select id="{{column.name}}"  ng-model='vm.data.{{column.name}}'  name="{{column.name}}"  {% if column.require %} required {% endif %} params="{comfBtn:false,halfDay:false,format:'YYYY-MM-DD'}"
						                               selected-date="vm.data.{{column.name}}"
						                               placeholder="请选择{{column.comment}}">
						                    <span ng-bind="vm.data.{{column.name}}.parseToDate().parseStr('YYYY-MM-DD')"></span>
						            </conow-date-select>
						        </div>
						    </div>
						    {% elif column.type=='staff' %}
						      <div class="form-group  {% if column.require %} required {% endif %}">
						        <label for="{{column.name}}">{{column.comment}}</label>

						        <div class="input-container"   >
						        	<conow-staffchoose  {% if column.require %} required hr-choose-validator tabindex="0"  {% endif %} id="{{column.name}}" name="{{column.name}}" ng-model="vm.data.{{column.name}}" is-multi="false" is-diy="false"></conow-staffchoose>
						        </div>
						    </div>
						    {% elif column.type=='org' %}
						      <div class="form-group  {% if column.require %} required {% endif %}">
						        <label for="{{column.name}}">{{column.comment}}</label>

						        <div class="input-container"   >
						        	<conow-orgchoose {% if column.require %} required hr-choose-validator tabindex="0"  {% endif %}  id="{{column.name}}" name="{{column.name}}" ng-model="vm.data.{{column.name}}" is-multi="false" is-diy="false"></conow-orgchoose>
						        </div>
						    </div>
						    {% else %}
						      <div class="form-group  {% if column.require %} required {% endif %}">
						        <label for="{{column.name}}">待扩展</label>
						        <div class="input-container">
						           待扩展
						        </div>
						    </div>
						    {% endif %}			    		
			    	{% endfor %}

				</conow-block>
				  {% if hasWorkflow %}
				  <div ng-if="vm.data.STATE=='BACK'||vm.data.STATE=='REVOKE'">
				  		<activiti-record businesskey="vm.dataId" work-key="{{tableName}}_WK" theme="list"></activiti-record>
				  </div>
		          {% endif %}
		   		<conow-block-actions>
		   			{% for btn in page.form_btns %}
		   			{% if btn.type=='SAVE' %}
                    <div class="col">
                    	{% if hasWorkflow %}
                    	<button class="btn btn-primary" {% if btn.isVail %}conow-submit{% else %}ng-click{% endif %}="vm.startFlow()" >{{btn.name}}</button>
                    	{% else %}
                    	<button class="btn btn-primary" {% if btn.isVail %}conow-submit{% else %}ng-click{% endif %}="vm.saveOrUpdate()" >{{btn.name}}</button>
                    	{% endif %}
                    </div>
                    {% elif btn.type=='SAVE_WORKFLOW' %}
                    <div class="col">
                        <button class="btn btn-primary" {% if btn.isVail %}conow-submit{% else %}ng-click{% endif %}="vm.startFlow()" >{{btn.name}}</button>
                    </div>
                    {% elif btn.type=='DELETE' %}
                    <div class="col">
                        <button class="btn btn-danger" {% if btn.isVail %}conow-submit{% else %}ng-click{% endif %}="vm.delete()" >{{btn.name}}</button>
                    </div>
                    {% else %}
                    <div class="col">
                        <button class="btn btn-dark" {% if btn.isVail %}conow-submit{% else %}ng-click{% endif %}="vm.saveTemp()" >{{btn.name}}</button>
                    </div>
                    {% endif %}	
                    {% endfor %}
                </conow-block-actions>
            </conow-block-form>
		 </form>
	</div-wrapper>
</div>